# Prelude.
AC_INIT([gearjoy], [0.1.1], [diogo.ramos@usp.br])

# unique source file --- primitive safety check 
AC_CONFIG_SRCDIR([src/Main.cc])

# place to put some extra build scripts installed
AC_CONFIG_AUX_DIR([build-aux])

# fairly severe build strictness
# change foreign to gnu or gnits to comply with gnu standards
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

# Checks for programs.
AC_PROG_CXX

# Checks for libraries.
PKG_CHECK_MODULES([GEARMEDULACPP], [gearmedulac++ >= 0.1.2])
AC_SUBST([GEARMEDULACPP_LIBS])
AC_SUBST([GEARMEDULACPP_CFLAGS])

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h])
AC_CHECK_HEADERS([joystick.h])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_FUNC_MALLOC

# Output files
AC_CONFIG_HEADERS([config.h])

AC_CONFIG_FILES([Makefile
                 src/Makefile])
AC_OUTPUT
